//
//  UIButton+ImageTitleLayout.h
//  YunWeiGu
//
//  Created by yuchanglin on 16/3/31.
//  Copyright © 2016年 WeiGu. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, MYButtonEdgeInsetsStyle) {
    
    MYButtonEdgeInsetsStyleTop,      // image在上，label在下
    MYButtonEdgeInsetsStyleLeft,     // image在左，label在右
    MYButtonEdgeInsetsStyleBottom,   // image在下，label在上
    MYButtonEdgeInsetsStyleRight     // image在右，label在左
};

@interface UIButton (ImageTitleLayout)

/**
 *  设置button的titleLabel和imageView的布局样式，及间距
 *
 *  @param style titleLabel和imageView的布局样式
 *  @param space titleLabel和imageView的间距
 */
- (void)layoutButtonWithEdgeInsetsStyle:(MYButtonEdgeInsetsStyle)style
                        imageTitleLayoutSpacing:(CGFloat)space;

- (void)layoutButtonWithEdgeInsetsImageTitleLayoutSpacing:(CGFloat)space;
@end
